#ifndef __EGLContext_H__
#define __EGLContext_H__


#include "U2GLESContext.h"


U2EG_NAMESPACE_BEGIN


class U2EGLSupport;

class _U2GLESShare U2EGLContext: public U2GLESContext
{
protected:
    ::EGLConfig     mConfig;
    const U2EGLSupport*    mGLSupport;
    ::EGLSurface    mDrawable;
    ::EGLContext    mContext;
    EGLDisplay      mEglDisplay;

public:
    U2EGLContext(EGLDisplay eglDisplay, const U2EGLSupport* glsupport, ::EGLConfig fbconfig, ::EGLSurface drawable);

    virtual ~U2EGLContext();

    virtual void setCurrent();
    virtual void endCurrent();
    virtual U2GLESContext* clone() const = 0;

	EGLSurface getDrawable() const;
};


U2EG_NAMESPACE_END


#endif
